<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://localhost:8080/Website/" />
<title>UseCase1LoginScenario2TestCase4</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">UseCase1LoginScenario2TestCase4</td></tr>
</thead><tbody>
<!--Created by Steven Chow-->
<!--Use Case: Login to Account-->
<!--Scenario 2: Unsuccessful Login-->
<!--Test Case 4: Missing Information-->
<!---->
<!--Go to Website-->
<tr>
	<td>open</td>
	<td>/Website/index.html</td>
	<td></td>
</tr>
<!---->
<!--Pre-Setup Expected Result: On page load, check that a login button is present-->
<tr>
	<td>assertElementPresent</td>
	<td>css=div.tile.bg-color-red &gt; div.tile-content.icon &gt; img</td>
	<td></td>
</tr>
<!---->
<!--STEP 1: Click the "Customer" button to login as a regular Customer-->
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile.bg-color-red &gt; div.tile-content.icon &gt; img</td>
	<td></td>
</tr>
<!---->
<!--EXPECTED RESULTS 1: Check if the Customer Login page will load-->
<tr>
	<td>assertTitle</td>
	<td>Customer Login</td>
	<td></td>
</tr>
<!--STEP 2: Enter missing name and password-->
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!---->
<!--EXPECTED RESULTS 2: Check if there is an Error Message.-->
<tr>
	<td>assertTextPresent</td>
	<td>Login</td>
	<td></td>
</tr>
<tr>
	<td>assertTextPresent</td>
	<td></td>
	<td> 			User does not exist </td>
</tr>
<!---->
<!--Go back to Main Page-->
<tr>
	<td>clickAndWait</td>
	<td>//a[contains(@href, 'index.html')]</td>
	<td></td>
</tr>
<tr>
	<td>assertTitle</td>
	<td>PlaneSimple</td>
	<td></td>
</tr>
<!---->
<!--Try to Login again-->
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile.bg-color-red &gt; div.tile-content.icon</td>
	<td></td>
</tr>
<tr>
	<td>assertTitle</td>
	<td>Customer Login</td>
	<td></td>
</tr>
<!---->
<!--STEP 3: Enter correct user but a missing password-->
<tr>
	<td>type</td>
	<td>name=username</td>
	<td>User1</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!---->
<!--EXPECTED RESULTS 3: Check if there is an Error Message.-->
<tr>
	<td>assertTextPresent</td>
	<td>Login</td>
	<td></td>
</tr>
<tr>
	<td>assertTextPresent</td>
	<td></td>
	<td> 			User does not exist </td>
</tr>
<!---->
<!--Go back to Main Page-->
<tr>
	<td>clickAndWait</td>
	<td>//a[contains(@href, 'index.html')]</td>
	<td></td>
</tr>
<tr>
	<td>assertTitle</td>
	<td>PlaneSimple</td>
	<td></td>
</tr>
<!---->
<!--Try to Login again-->
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile.bg-color-red &gt; div.tile-content.icon</td>
	<td></td>
</tr>
<tr>
	<td>assertTitle</td>
	<td>Customer Login</td>
	<td></td>
</tr>
<!---->
<!--STEP 4: Enter no but a correct password-->
<tr>
	<td>type</td>
	<td>name=password</td>
	<td>pass1</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!---->
<!--EXPECTED RESULTS 3: Check if there is an Error Message.-->
<tr>
	<td>assertTextPresent</td>
	<td>Login</td>
	<td></td>
</tr>
<tr>
	<td>assertTextPresent</td>
	<td></td>
	<td> 			User does not exist </td>
</tr>
<!---->
<!--Go back to Main Page-->
<tr>
	<td>clickAndWait</td>
	<td>//a[contains(@href, 'index.html')]</td>
	<td></td>
</tr>
<tr>
	<td>assertTitle</td>
	<td>PlaneSimple</td>
	<td></td>
</tr>
</tbody></table>
</body>
</html>
